<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TDateTime类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_t_date_time.html">TDateTime</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_t_date_time-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TDateTime类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:afba08c89a6a0bc5250018944316ff928"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#afba08c89a6a0bc5250018944316ff928">TDateTime</a> (long <a class="el" href="classawtk_1_1_t_date_time.html#af15f83e49c8e8588dadb7729847c78c0">nativeObj</a>)</td></tr>
<tr class="separator:afba08c89a6a0bc5250018944316ff928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a931d4d8b819db31158a5edfd6e9d7bee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a931d4d8b819db31158a5edfd6e9d7bee">setYear</a> (int year)</td></tr>
<tr class="separator:a931d4d8b819db31158a5edfd6e9d7bee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7e3128d260143e3b9e9be07ae727d72"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ab7e3128d260143e3b9e9be07ae727d72">setMonth</a> (int month)</td></tr>
<tr class="separator:ab7e3128d260143e3b9e9be07ae727d72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a68f70ae5564d390cc5bbdfec6bfc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ad2a68f70ae5564d390cc5bbdfec6bfc1">setDay</a> (int day)</td></tr>
<tr class="separator:ad2a68f70ae5564d390cc5bbdfec6bfc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a900914e7eb2cbe152c3caadea1f8f9f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a900914e7eb2cbe152c3caadea1f8f9f8">setHour</a> (int hour)</td></tr>
<tr class="separator:a900914e7eb2cbe152c3caadea1f8f9f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a674bb215238a6eed5ecbbe8cf15b3116"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a674bb215238a6eed5ecbbe8cf15b3116">setMinute</a> (int minute)</td></tr>
<tr class="separator:a674bb215238a6eed5ecbbe8cf15b3116"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5984c1c868ebcf3e6ee442ea68debbf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#aa5984c1c868ebcf3e6ee442ea68debbf">setSecond</a> (int second)</td></tr>
<tr class="separator:aa5984c1c868ebcf3e6ee442ea68debbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4195be3459d68b19c9b5c5322113f330"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a4195be3459d68b19c9b5c5322113f330">set</a> ()</td></tr>
<tr class="separator:a4195be3459d68b19c9b5c5322113f330"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace798ba8699c84701bca15f173f0cad9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ace798ba8699c84701bca15f173f0cad9">fromTime</a> (long time)</td></tr>
<tr class="separator:ace798ba8699c84701bca15f173f0cad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07cb539ef4a0c434a420b1dc48a300c2"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a07cb539ef4a0c434a420b1dc48a300c2">toTime</a> ()</td></tr>
<tr class="separator:a07cb539ef4a0c434a420b1dc48a300c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7edef39990dff833e26eaa552e2027e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a7edef39990dff833e26eaa552e2027e3">addDelta</a> (long delta)</td></tr>
<tr class="separator:a7edef39990dff833e26eaa552e2027e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad54b78c4bdf772a71d3ff897be81089e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ad54b78c4bdf772a71d3ff897be81089e">destroy</a> ()</td></tr>
<tr class="separator:ad54b78c4bdf772a71d3ff897be81089e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8f959ab33f1cf67774143fe538031e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ad8f959ab33f1cf67774143fe538031e7">getSecond</a> ()</td></tr>
<tr class="separator:ad8f959ab33f1cf67774143fe538031e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acecc573ec7c18ce2a14cf44e8cc064fd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#acecc573ec7c18ce2a14cf44e8cc064fd">getMinute</a> ()</td></tr>
<tr class="separator:acecc573ec7c18ce2a14cf44e8cc064fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bd9a0e52a2bccbebfafc214c55758e3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a2bd9a0e52a2bccbebfafc214c55758e3">getHour</a> ()</td></tr>
<tr class="separator:a2bd9a0e52a2bccbebfafc214c55758e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fc4c14caf7149c05d521164e87595af"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a7fc4c14caf7149c05d521164e87595af">getDay</a> ()</td></tr>
<tr class="separator:a7fc4c14caf7149c05d521164e87595af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53908f91deb3d3647c499f7c622842df"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a53908f91deb3d3647c499f7c622842df">getMonth</a> ()</td></tr>
<tr class="separator:a53908f91deb3d3647c499f7c622842df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4851c571ff7dae7fe0e33d94285175e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#af4851c571ff7dae7fe0e33d94285175e">getYear</a> ()</td></tr>
<tr class="separator:af4851c571ff7dae7fe0e33d94285175e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a8cd031c35edc0ad587c5a11302394f42"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_date_time.html">TDateTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a8cd031c35edc0ad587c5a11302394f42">cast</a> (long <a class="el" href="classawtk_1_1_t_date_time.html#af15f83e49c8e8588dadb7729847c78c0">nativeObj</a>)</td></tr>
<tr class="separator:a8cd031c35edc0ad587c5a11302394f42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a591414f54431f6dbacd5cf4638d58224"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_date_time.html">TDateTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a591414f54431f6dbacd5cf4638d58224">create</a> ()</td></tr>
<tr class="separator:a591414f54431f6dbacd5cf4638d58224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaffafe7009c644e039ebf2360d9f7728"><td class="memItemLeft" align="right" valign="top">static boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#aaffafe7009c644e039ebf2360d9f7728">isLeap</a> (int year)</td></tr>
<tr class="separator:aaffafe7009c644e039ebf2360d9f7728"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff8d29e11befe003adedb0014b411742"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#aff8d29e11befe003adedb0014b411742">getDays</a> (int year, int month)</td></tr>
<tr class="separator:aff8d29e11befe003adedb0014b411742"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ae7cd9b6af5fa659830045f422c1f7f"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#a2ae7cd9b6af5fa659830045f422c1f7f">getWday</a> (int year, int month, int day)</td></tr>
<tr class="separator:a2ae7cd9b6af5fa659830045f422c1f7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac52c49afa0483761b8a0306454882e27"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ac52c49afa0483761b8a0306454882e27">getMonthName</a> (int month)</td></tr>
<tr class="separator:ac52c49afa0483761b8a0306454882e27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac094126c09cef7a9ea97c96e85df05c9"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#ac094126c09cef7a9ea97c96e85df05c9">getWdayName</a> (int wday)</td></tr>
<tr class="separator:ac094126c09cef7a9ea97c96e85df05c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:af15f83e49c8e8588dadb7729847c78c0"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_date_time.html#af15f83e49c8e8588dadb7729847c78c0">nativeObj</a></td></tr>
<tr class="separator:af15f83e49c8e8588dadb7729847c78c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>日期时间。</p>
<blockquote class="doxtable">
<p>在嵌入式平台中，在系统初始时，需要调用date_time_global_init设置实际获取/设置系统时间的函数。 </p>
</blockquote>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="afba08c89a6a0bc5250018944316ff928"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afba08c89a6a0bc5250018944316ff928">&#9670;&nbsp;</a></span>TDateTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">awtk.TDateTime.TDateTime </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过nativeObj构造Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a7edef39990dff833e26eaa552e2027e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7edef39990dff833e26eaa552e2027e3">&#9670;&nbsp;</a></span>addDelta()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.addDelta </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>加上一个偏移量(s)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>偏移量(s)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8cd031c35edc0ad587c5a11302394f42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8cd031c35edc0ad587c5a11302394f42">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_date_time.html">TDateTime</a> awtk.TDateTime.cast </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>把nativeObj转换层Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<a id="a591414f54431f6dbacd5cf4638d58224"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a591414f54431f6dbacd5cf4638d58224">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_date_time.html">TDateTime</a> awtk.TDateTime.create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建date_time对象，并初始为当前日期和时间(一般供脚本语言中使用)。</p>
<dl class="section return"><dt>返回</dt><dd>返回date_time对象。 </dd></dl>

</div>
</div>
<a id="ad54b78c4bdf772a71d3ff897be81089e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad54b78c4bdf772a71d3ff897be81089e">&#9670;&nbsp;</a></span>destroy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>销毁date_time对象(一般供脚本语言中使用)。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ace798ba8699c84701bca15f173f0cad9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace798ba8699c84701bca15f173f0cad9">&#9670;&nbsp;</a></span>fromTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.fromTime </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从time转换而来(按GMT转换)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7fc4c14caf7149c05d521164e87595af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fc4c14caf7149c05d521164e87595af">&#9670;&nbsp;</a></span>getDay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getDay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>日(1-31)。 </p>

</div>
</div>
<a id="aff8d29e11befe003adedb0014b411742"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff8d29e11befe003adedb0014b411742">&#9670;&nbsp;</a></span>getDays()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int awtk.TDateTime.getDays </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>year</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>month</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取指定年份月份的天数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">year</td><td>年份。 </td></tr>
    <tr><td class="paramname">month</td><td>月份(1-12)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回大于0表示天数，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a2bd9a0e52a2bccbebfafc214c55758e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bd9a0e52a2bccbebfafc214c55758e3">&#9670;&nbsp;</a></span>getHour()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getHour </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>时(0 - 23)。 </p>

</div>
</div>
<a id="acecc573ec7c18ce2a14cf44e8cc064fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acecc573ec7c18ce2a14cf44e8cc064fd">&#9670;&nbsp;</a></span>getMinute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getMinute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>分(0 - 59)。 </p>

</div>
</div>
<a id="a53908f91deb3d3647c499f7c622842df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53908f91deb3d3647c499f7c622842df">&#9670;&nbsp;</a></span>getMonth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getMonth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>月(1-12)。 </p>

</div>
</div>
<a id="ac52c49afa0483761b8a0306454882e27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac52c49afa0483761b8a0306454882e27">&#9670;&nbsp;</a></span>getMonthName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String awtk.TDateTime.getMonthName </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>month</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取指定月份的英文名称(简写)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">month</td><td>月份(1-12)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回指定月份的英文名称(简写)。 </dd></dl>

</div>
</div>
<a id="ad8f959ab33f1cf67774143fe538031e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8f959ab33f1cf67774143fe538031e7">&#9670;&nbsp;</a></span>getSecond()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getSecond </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>秒(0 - 59)。 </p>

</div>
</div>
<a id="a2ae7cd9b6af5fa659830045f422c1f7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ae7cd9b6af5fa659830045f422c1f7f">&#9670;&nbsp;</a></span>getWday()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int awtk.TDateTime.getWday </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>year</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>month</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>day</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取指定日期是周几(0-6, Sunday = 0)。。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">year</td><td>年份。 </td></tr>
    <tr><td class="paramname">month</td><td>月份(1-12)。 </td></tr>
    <tr><td class="paramname">day</td><td>日(1-31)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回大于等于0表示周几(0-6)，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac094126c09cef7a9ea97c96e85df05c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac094126c09cef7a9ea97c96e85df05c9">&#9670;&nbsp;</a></span>getWdayName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String awtk.TDateTime.getWdayName </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>wday</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取周几的英文名称(简写)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">wday</td><td>星期几(0-6, Sunday = 0)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回指定周几的英文名称(简写)。 </dd></dl>

</div>
</div>
<a id="af4851c571ff7dae7fe0e33d94285175e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4851c571ff7dae7fe0e33d94285175e">&#9670;&nbsp;</a></span>getYear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TDateTime.getYear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>年。 </p>

</div>
</div>
<a id="aaffafe7009c644e039ebf2360d9f7728"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaffafe7009c644e039ebf2360d9f7728">&#9670;&nbsp;</a></span>isLeap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static boolean awtk.TDateTime.isLeap </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>year</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>是否是闰年。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">year</td><td>年份。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示是，否则表示否。 </dd></dl>

</div>
</div>
<a id="a4195be3459d68b19c9b5c5322113f330"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4195be3459d68b19c9b5c5322113f330">&#9670;&nbsp;</a></span>set()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.set </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置当前时间。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ad2a68f70ae5564d390cc5bbdfec6bfc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2a68f70ae5564d390cc5bbdfec6bfc1">&#9670;&nbsp;</a></span>setDay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setDay </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>day</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置日。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">day</td><td>日。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a900914e7eb2cbe152c3caadea1f8f9f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a900914e7eb2cbe152c3caadea1f8f9f8">&#9670;&nbsp;</a></span>setHour()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setHour </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>hour</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置小时。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">hour</td><td>小时。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a674bb215238a6eed5ecbbe8cf15b3116"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a674bb215238a6eed5ecbbe8cf15b3116">&#9670;&nbsp;</a></span>setMinute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setMinute </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>minute</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置分钟。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">minute</td><td>分钟。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab7e3128d260143e3b9e9be07ae727d72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7e3128d260143e3b9e9be07ae727d72">&#9670;&nbsp;</a></span>setMonth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setMonth </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>month</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置月。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">month</td><td>月。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa5984c1c868ebcf3e6ee442ea68debbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5984c1c868ebcf3e6ee442ea68debbf">&#9670;&nbsp;</a></span>setSecond()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setSecond </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>second</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置秒。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">second</td><td>秒。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a931d4d8b819db31158a5edfd6e9d7bee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a931d4d8b819db31158a5edfd6e9d7bee">&#9670;&nbsp;</a></span>setYear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDateTime.setYear </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>year</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置年。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">year</td><td>年。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a07cb539ef4a0c434a420b1dc48a300c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07cb539ef4a0c434a420b1dc48a300c2">&#9670;&nbsp;</a></span>toTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long awtk.TDateTime.toTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换成time(按GMT转换)。</p>
<dl class="section return"><dt>返回</dt><dd>返回time。 </dd></dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="af15f83e49c8e8588dadb7729847c78c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af15f83e49c8e8588dadb7729847c78c0">&#9670;&nbsp;</a></span>nativeObj</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long awtk.TDateTime.nativeObj</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>原生对象。 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TDateTime.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
